<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>List of Posts</title>
    </head>
    <body>

    <h1>List of Posts currently in Database</h1>
    
<table id="postListTable" border="3">
<tr >
    <th bgcolor=>ID</th>
    <th bgcolor=>Tweet</th>
    <th bgcolor=>Visible</th>
    <th bgcolor=>User ID</th>
</tr>
<c:forEach var="post" begin="0" items="${requestScope.postList}">
<tr>
    <td><a href="UpdatePost?id=${post.id}">${post.id} &nbsp;&nbsp;</a></td> 
    <td>${post.tweet}&nbsp;&nbsp;</td> 
    <td>${post.visible}&nbsp;&nbsp;</td> 
    <td>${post.userId}&nbsp;&nbsp;</td>
</tr> 

</c:forEach>

</table>
<a href="CreatePost.jsp"><strong>Create a Post Record</strong></a>
    </body>
</html>